package com.flashcash.solu.view.certification.timeline;

import android.os.Parcel;
import android.os.Parcelable;

public class TimeLineModel implements Parcelable {


    CertType certType;
    private int icon;
    private String desc;
    private OrderStatus mStatus;

    public TimeLineModel(CertType certType, int icon, String desc, OrderStatus mStatus) {
        this.certType = certType;
        this.desc = desc;
        this.mStatus = mStatus;
        this.icon = icon;
    }

    public CertType getCertType() {
        return certType;
    }

    public void setCertType(CertType certType) {
        this.certType = certType;
    }
    public int getIcon() {
        return icon;
    }

    public void setIcon(int icon) {
        this.icon = icon;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }


    public OrderStatus getStatus() {
        return mStatus;
    }

    public void setStatus(OrderStatus mStatus) {
        this.mStatus = mStatus;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.icon);
        dest.writeString(this.desc);
        dest.writeInt(this.mStatus == null ? -1 : this.mStatus.ordinal());
    }

    protected TimeLineModel(Parcel in) {
        this.icon = in.readInt();
        this.desc = in.readString();
        int tmpMStatus = in.readInt();
        this.mStatus = tmpMStatus == -1 ? null : OrderStatus.values()[tmpMStatus];
    }

    public static final Parcelable.Creator<TimeLineModel> CREATOR = new Parcelable.Creator<TimeLineModel>() {
        @Override
        public TimeLineModel createFromParcel(Parcel source) {
            return new TimeLineModel(source);
        }

        @Override
        public TimeLineModel[] newArray(int size) {
            return new TimeLineModel[size];
        }
    };

    public enum CertType{
        PERSONAL, PROFESSIONAL, CONTACT, UPLOAD_PHOTOS
    }
}